<template>
 <div>
  <commons-menu @news-added="handleNewsAdded"></commons-menu>
  <news-list ref="newsList"></news-list>
 </div>
</template>

<script>
import CommonsMenu from '@/components/CommonsMenu.vue';
import NewsList from '@/components/NewsList.vue';
export default {
    name:'NewsListView',
    components:{
        CommonsMenu,
        NewsList,
    },
    methods: {
    handleNewsAdded() {
      this.$refs.newsList.fetchNewsData();
    }
  },
  created() {
    this.$store.commit('setShowPage',2)
  },
}
</script>

<style>

</style>